package top.kaoshanji.p1ch04a;

/**
 * 代码清单-p1ch04a-072页b：字符串操作符
 * author kaoshanji
 * ^_^
 * create time 2025/3/6 19:37
 */
public class StringOperators {

    public static void main(String[] args) {
        int x = 0, y = 1, z = 2;
        String s = "x, y, z ";
        System.out.println(s + x + y + z);

        // 将 x 转为字符串
        System.out.println(x + " " + s);
        s += "(summed) = "; // 拼接操作符
        System.out.println(s + (x + y + z));

        // Integer.toString() 的简化版
        System.out.println("" + x);

    }



}
